home *** CD-ROM | disk | FTP | other *** search
- /*
- File: AppleShareFileServerControl.h
-
- Contains: Interface definitions for Server Control calls, and Server Event constants;
-
- Version: Technology: AppleShare IP 6.0
- Release: ASIP 6.2 SDK - Wednesday, August 25, 1999 09:29:55
-
- Copyright: © 1995-1999 by Apple Computer, Inc., all rights reserved.
-
- Bugs?: For bug reports, consult the following page on
- the World Wide Web:
-
- http://developer.apple.com/bugreporter/
-
- */
- #ifndef __APPLESHAREFILESERVERCONTROL__
- #define __APPLESHAREFILESERVERCONTROL__
-
- #ifndef __APPLETALK__
- #include <AppleTalk.h>
- #endif
-
- #ifndef __FILES__
- #include <Files.h>
- #endif
-
- #ifndef __MIXEDMODE__
- #include <MixedMode.h>
- #endif
-
- #ifndef __TRAPS__
- #include <Traps.h>
- #endif
-
-
-
-
- #if PRAGMA_ONCE
- #pragma once
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT
- #pragma import on
- #endif
-
- #if PRAGMA_STRUCT_ALIGN
- #pragma options align=mac68k
- #elif PRAGMA_STRUCT_PACKPUSH
- #pragma pack(push, 2)
- #elif PRAGMA_STRUCT_PACK
- #pragma pack(2)
- #endif
-
- /* Server Control Codes ---------------------------------------------------------------------------- */
- enum {
- kSCStartServer = 0, /* Use StartParam variant */
- kSCShutDown = 2, /* Use DisconnectParam variant */
- kSCCancelShutDown = 3, /* Use DisconnectParam variant */
- kSCDisconnect = 4, /* Use DisconnectParam variant */
- kSCPollServer = 5, /* Use PollServerParam variant */
- kSCGetExpFldr = 6, /* Use StandardParam variant */
- kSCGetSetupInfo = 7, /* Use SetupParam variant */
- kSCSetSetupInfo = 8, /* Use SetupParam variant */
- kSCSendMessage = 9, /* Use DisconnectParam variant */
- kSCGetServerStatus = 10, /* Use StatusParam variant */
- kSCInstallServerEventProc = 11, /* Use ServerEventParam variant */
- kSCRemoveServerEventProc = 12, /* Use ServerEventParam variant */
- kSCGetServerEventProc = 13, /* Use ServerEventParam variant */
- kSCServerVersion = 14, /* Use VersionParam variant */
- kSCSetCopyProtect = 16, /* Use StandardParam variant */
- kSCClrCopyProtect = 17, /* Use StandardParam variant */
- kSCDisconnectVolUsers = 18, /* Use DisconnectParam variant */
- kSCGetUserNameRec = 19, /* Use UserInfoParam variant */
- kSCGetUserMountInfo = 20, /* Use VolMountedParam variant */
- kSCWakeServer = 21, /* Use StartParam variant */
- kSCSleepServer = 22, /* Use DisconnectParam variant */
- kSCGetCacheStats = 23, /* Use GetCacheStatsParam variant */
- kSCResetCache = 31, /* Use ResetCacheParam variant */
- kSCGetExtUserNameRec = 35, /* Use ExtUserInfoParam variant */
- kSCServiceStateInfo = 38, /* Use ServiceStateParam variant */
- kSCGetPlugInInfo = 41, /* Use PlugInInfoParam variant */
- kSCGetPlugInMimeType = 42, /* Use PlugInMimeTypeParam variant */
- kSCSetHistorySampleTime = 43, /* Use SetHistoryParam variant */
- kSCGetServerActivityHistory = 44, /* Use GetHistoryParam variant*/
- kSCGetSMBConfig = 46, /* Use SMBConfigParam variant*/
- kSCBlockGetUserList = 47 /* Use BlockUserRecParam variant*/
- };
-
- /* General Constants ------------------------------------------------------------------------------- */
- /* PollServer scServerState responses... */
- enum {
- kSCPollRunning = -1,
- kSCPollStartingUp = -2,
- kSCPollJustDisabled = -3,
- kSCPollDisabledErr = -4,
- kSCPollSleeping = -5
- };
-
- /* PollServer scDisconnectState responses... */
- enum {
- kSCNotDisconnecting = -1,
- kSCDisconnectWithin29Secs = 0,
- kSCDisconnect30To89Secs = 1 /* Any other value is the number of minutes remaining, rounded... */
- };
-
- /* PollServer scServerErrors responses... */
- enum {
- kSCModernMemMgrOffErr = 1, /* Must run with Modern Memory Manager */
- kSCNoThreadLibraryErr = 2,
- kSCServiceNotInstalledErr = 3,
- kSCInsuffMFMemErr = 4,
- kSCCantRegNameErr = 5,
- kSCCantFindExtnFolderErr = 6,
- kSCUnExATalkErr = 7,
- kSCNoMachineNameErr = 8,
- kSCCantFindFSExtnErr = 9,
- kSCATalkOffErr = 10,
- kSCNoInitRunErr = 12,
- kSCInsuffAppMemErr = 14,
- kSCBadConfigErr = 15,
- kSCNoDTOnStartupErr = 16,
- kSCDupNameErr = 17,
- kSCBadFileBufParmsErr = 19,
- kSCNeedRootUserErr = 20, /* The range 21-28 are reserved for future use by Apple. */
- kSCBadSerialNumErr = 29,
- kSCSysTooOldErr = 34,
- kSCDupSerialNumberErr = 36, /* NBP dup serial number detected */
- kSCVMOnErr = 37, /* Virtual Memory is turned on on server machine */
- kSCNoPPCErr = 38, /* Server only runs on a ppc machine */
- kSCBadInitErr = 39,
- kSCOpenTransportInstallErr = 40, /* Incompatible version of Open Transport */
- kSCNoAgentLibErr = 41, /* No ASRLib */
- kSCNoAgentSessionErr = 42, /* Could not open an agent session */
- kSCInvalidAgentErr = 43, /* No agent or a problem with the agent */
- kSCAgentServerObjErr = 44, /* Bad server object type. */
- kSCAgentGenesisErr = 46,
- kSCAlreadyShuttingDown = -1,
- kSCAlreadyDisconnecting = -2,
- kSCDeletedPDSErr = -2,
- kSCContainsExpFolderErr = -3,
- kSCCantPrepareVolumeErr = -4,
- kSCTooManyExpFoldersErr = -5,
- kSCFixedPDSErr = -6,
- kSCExpFolderNamConfErr = -7,
- kSCNoExportFolderErr = -8,
- kSCInsideExpFolderErr = -9,
- kSCInsideTrashErr = -10,
- kSCVolNameConflictErr = -11,
- kSCCacheReducedErr = -12,
- kSCBadIPConfigErr = -20,
- kSCBadAccessPrivRecErr = -21,
- kSCBadMimeTypeFileErr = -22,
- kSCDuplicateVolumeErr = -23, /* Second volume with same name will not be shared */
- /* -100 to -199 are AFP errors */
- kSCAFPGenErr = -100,
- kSCAFPTCPGenErr = -150,
- kSCAFPTCPMemErr = -151,
- kSCAFPTCPPortInUseErr = -152, /* -200 to -299 are FTP errors */
- kSCFTPGenErr = -200,
- kSCFTPPortInUseErr = -201,
- kSCFTPNotAvailErr = -202,
- kSCFTPMemErr = -203, /* -300 to -399 are Web errors */
- kSCHTTPGenErr = -300,
- kSCHTTPPortInUseErr = -302,
- kSCHTTPFolderErr = -303,
- kSCHTTPFileErr = -304,
- kSCHTTPMemErr = -305,
- kSCHTTPNoMimeTypesErr = -306,
- kSCHTTPNoDefaultMimeErr = -307,
- kSCPluginDirNotFoundErr = -308,
- kSCPluginMemFullErr = -309,
- kSCPluginPreProcNotFoundErr = -310,
- kSCPluginPostProcNotFoundErr = -311,
- kSCErrorPluginNotFoundErr = -312,
- kSCPluginNotPreProcessorErr = -313,
- kSCPluginNotPostProcessorErr = -314,
- kSCPluginMemPoolFullErr = -315,
- kSCPluginOutOfMemoryErr = -316,
- kSCCorruptedMimeTypesErr = -317,
- kSCPlugInLoggingErr = -318,
- kSCPlugInTypeConflictErr = -319,
- kSCPlugInCannotRegisterErr = -320,
- kSCPlugInMemSmallErr = -321,
- kSCWebAdminNetworkErr = -330, /* -400 to -499 are SMB errors */
- kSCSMBGenErr = -400,
- kSCSMBPortInUseErr = -402,
- kSCSMBMemErr = -405
- };
-
- /* Define times for shutdown... */
- enum {
- kSCMaxTimer = 4094,
- kSCMinTimer = 0
- };
-
- /* Plugin errors (PlugInMimeTypeParam, PlugInInfoParam)... */
- enum {
- kSCPlugInNoErr = 0,
- kSCPlugInWrongVersionErr = 1,
- kSCPlugInBadIndexErr = 2,
- kSCPlugInPlugInsNotLoadedErr = 3,
- kSCPlugInBadPlugInRefErr = 4
- };
-
- /* Plugin info dimensions (C-strings)... */
- enum {
- kSCPlugInNameSize = 32,
- kSCPlugInAdminURLSize = 256,
- kSCPlugInVersionStrSize = 12,
- kSCMimeTypeSize = 80,
- kSCSuffixSize = 32
- };
-
- /* Number of samples in ServerHistoryRec... */
- enum {
- kSCMaxDataPoints = 1024
- };
-
- /* For siVersion field of SetupInfoRec...*/
- enum {
- kSCSetUpRecordVersion = 3
- };
-
- /* VersionParam's scServerType contains the server type, which is interpreted as follows: */
- enum {
- kSCMFSServerType = 0x0000, /* Macintosh File Sharing */
- kSCAFSServerType = 0x0001 /* AppleShare/AppleShare IP File Server */
- };
-
- #ifndef SCCACHESTATSRECVERS3
- #define SCCACHESTATSRECVERS3 1
- /* For csVersion field of SCCacheStatsRec... */
- enum {
- kSCCacheStatsRecVersion = 3
- };
-
- #endif /* !defined(SCCACHESTATSRECVERS3) */
-
- /* Current version number of scFileInfoRec block... */
- enum {
- kSCFileInfoRecVersion = 1
- };
-
- /* Parameters for the "bitmap" field of ResetCacheParam... */
- enum {
- kSCResetFileCache = 0x0001,
- kSCResetCNodeCache = 0x0002,
- kSCResetDTCache = 0x0004,
- kSCShrinkCache = 0x8000,
- kSCShrinkAllCaches = 0x8007
- };
-
- /* For attrVersion field of ExtUserInfoParam... */
- enum {
- kSCOldUserAttrRecVersion = 0,
- kSCUserAttrRecVersion = 1
- };
-
- /* Current session layers for scProtocolType field of UserAttrRec... */
- enum {
- kSCSessionInvalid = 0x0000,
- kSCSessionAll = FOUR_CHAR_CODE('alls'),
- kSCSessionAFP = FOUR_CHAR_CODE('afp '),
- kSCSessionHTTP = FOUR_CHAR_CODE('http'),
- kSCSessionFTP = FOUR_CHAR_CODE('ftp '),
- kSCSessionSMB = FOUR_CHAR_CODE('smb '),
- kSCSessionNFS = FOUR_CHAR_CODE('nfs ')
- };
-
- /* Current transport layers for scTransportType field of UserAttrRec... */
- enum {
- kSCTransportATP = FOUR_CHAR_CODE('atp '),
- kSCTransportTCP = FOUR_CHAR_CODE('tcp ')
- };
-
- /* For version field of PlugInInfoParam... */
- enum {
- kSCPlugInInfoParamVersion = 0
- };
-
- /* For plugInAttributes field of PlugInInfoParam... */
- enum {
- kSCAttPreProcessor = 0x00000001, /* works as a preprocessor */
- kSCAttPostProcessor = 0x00000002, /* works as a postprocessor */
- kSCAttFilter = 0x00000004, /* works as filter */
- kSCAttAccessControl = 0x00000008, /* works as access control */
- kSCAttErrorProcessor = 0x00000010 /* works as error processor */
- };
-
- /* Current version number of SCSrvrMsgsRec... */
- enum {
- kSCSrvrMsgsRecVersion = 1
- };
-
- /* For version field of PlugInMimeTypeParam... */
- enum {
- kSCPlugInMimeTypeParamVersion = 0
- };
-
- /* For version field of BlockUserRecParam...*/
- enum {
- kSCBlockGetUserRecObsoleteVersion1 = 1,
- kSCBlockGetUserRecVersion = 2
- };
-
- /* Flags for user in BlockUserRecParam...*/
- enum {
- kSCFlagUserSleeping = 0x00000001
- };
-
- /* Other service states...*/
- enum {
- kSCFTPServiceBit = 0x01,
- kSCSMBServiceBit = 0x02
- };
-
- /* Misc params...*/
- enum {
- kSCCurrentlyInstalled = 0,
- kSCUseFinderExtension = 0,
- kSCStartingEntity = 1,
- kSCStartingExtension = 2,
- kSCUseMessagePtr = 1
- };
-
- /* Server Event Detail ----------------------------------------------------------------------------- */
- /*
- Bit names for the serverEventMask field of ServerEventQEntry; event numbers returned in
- ServerEventRecord...
- */
- enum {
- kSCStartAFPRequestEvt = 0, /* also set afpCommandMask for these */
- kSCSendAFPResponseEvt = 1
- };
-
- enum {
- kSCServerControlCallEvt = 4 /* also set serverControlMask for this */
- };
-
- enum {
- kSCServerBusyEvt = 2,
- kSCServerShutdownEvt = 3,
- kSCShareEvt = 5,
- kSCUnShareEvt = 6,
- kSCSetDirAccessEvt = 7,
- kSCServerNameChangeEvt = 8,
- kSCVolumePrepEvt = 9,
- kSCVolumeUnmountEvt = 10,
- kSCServerStartupEvt = 11,
- kSCSessionTornDownEvt = 12,
- kSCOutOfSequenceEvt = 13,
- kSCWksClosedSessionEvt = 14,
- kSCSessionTimedOutEvt = 15,
- kSCSrvrClosedSessionEvt = 16,
- kSCExtendedServerEvtRec = 31
- };
-
- /* Maximum size of the Buffer in the ServerEventRecord... */
- enum {
- kBufferMax = 48
- };
-
-
- struct IPBlock {
- UInt8 part[4];
- };
- typedef struct IPBlock IPBlock;
-
- union UserAddress {
- UInt32 wholeAddress;
- AddrBlock appleTalkAddress;
- IPBlock ipAddress;
- };
- typedef union UserAddress UserAddress;
-
- struct ServerEventRecord {
- SInt32 eventNumber;
- UInt32 serverTimeInSeconds;
- SInt16 result;
- SInt16 bufferSize;
- char buffer[48];
- Str31 nameStr;
- SInt16 afpCommand;
- SInt32 sessionID;
- SInt32 userID;
- Str31 userName;
- SInt16 vRefNum;
- SInt32 dirID;
- UserAddress addr;
- };
- typedef struct ServerEventRecord ServerEventRecord;
- /* For annexVersion field; set by server to indicate version of record... */
- enum {
- kServerEventAnnexVersion6 = 0x06000000
- };
-
-
- struct ExtendedServerEventRecord {
- SInt32 eventNumber;
- UInt32 serverTimeInSeconds;
- SInt16 result;
- SInt16 bufferSize;
- char buffer[48];
- Str31 nameStr;
- SInt16 afpCommand;
- SInt32 sessionID;
- SInt32 userID;
- Str31 userName;
- SInt16 vRefNum;
- SInt32 dirID;
- UserAddress addr;
- FourCharCode transportType;
- UInt32 annexVersion;
- };
- typedef struct ExtendedServerEventRecord ExtendedServerEventRecord;
- typedef struct ServerEventQEntry ServerEventQEntry;
-
- typedef ServerEventQEntry * ServerEventQEntryPtr;
- typedef CALLBACK_API( void , ServerEventHandlerProcPtr )(ServerEventQEntryPtr entry, ExtendedServerEventRecord *event);
- typedef STACK_UPP_TYPE(ServerEventHandlerProcPtr) ServerEventHandlerUPP;
-
- struct ServerEventQEntry {
- ServerEventQEntryPtr next;
- SInt16 queuetype;
- ServerEventHandlerUPP callBack;
- SInt32 serverEventMask;
- SInt32 afpCommandMask[2];
- SInt32 serverControlMask;
- };
-
- #if OPAQUE_UPP_TYPES
- EXTERN_API(ServerEventHandlerUPP)
- NewServerEventHandlerUPP (ServerEventHandlerProcPtr userRoutine);
-
- EXTERN_API(void)
- DisposeServerEventHandlerUPP (ServerEventHandlerUPP userUPP);
-
- #else
- enum { uppServerEventHandlerProcInfo = 0x000003C0 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
- #define NewServerEventHandlerUPP(userRoutine) (ServerEventHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppServerEventHandlerProcInfo, GetCurrentArchitecture())
- #define DisposeServerEventHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #endif
- /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
- #define NewServerEventHandlerProc(userRoutine) NewServerEventHandlerUPP(userRoutine)
- /* Server Control Data Structures ------------------------------------------------------------------ */
- /*
- Since all calls are made through ServerDispatchSync, ioCompletion is ignored, so this is for
- completeness only...,
- */
- typedef UniversalProcPtr SCCompletionUPP;
-
- struct StartParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- SInt32 reserved;
- SInt16 reserved2;
- SInt16 reserved3;
- SInt16 scCode;
- SInt16 scStartSelect;
- SInt16 scEventSelect;
- SInt32 scWhere;
- SInt32 scReceiverID;
- SInt32 scDataType;
- SInt32 scStartOptions;
- };
- typedef struct StartParam StartParam;
- typedef StartParam * StartParamPtr;
-
- struct DisconnectParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- SInt32 * scDiscArrayPtr;
- SInt16 scArrayCount;
- SInt16 reserved;
- SInt16 scCode;
- SInt16 scNumMinutes;
- SInt16 scFlags;
- StringPtr scMessagePtr;
- };
- typedef struct DisconnectParam DisconnectParam;
- typedef DisconnectParam * DisconnectParamPtr;
-
- struct PollServerParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- SInt32 reserved;
- SInt16 reserved2;
- SInt16 reserved3;
- SInt16 scCode;
- SInt16 scServerState;
- SInt16 scDisconnectState;
- SInt16 scServerError;
- SInt32 scSecondsLeft;
- };
- typedef struct PollServerParam PollServerParam;
- typedef PollServerParam * PollServerParamPtr;
-
- struct StandardParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- StringPtr scNamePtr;
- SInt16 scVRefNum;
- SInt16 scLogins;
- SInt16 scCode;
- SInt16 scIndex;
- SInt32 scDirID;
- };
- typedef struct StandardParam StandardParam;
- typedef StandardParam * StandardParamPtr;
-
- typedef unsigned char Str198[199];
-
- struct SetupInfoRec {
- SInt16 siVersion;
- SInt16 siFlags;
- SInt16 siMaxLogins;
- SInt16 siSrvrUsageLimit;
- Point siVolInfoLocation;
- Boolean siVolInfoVisible;
- Boolean siReserved1;
- Point siUserInfoLocation;
- Boolean siUserInfoVisible;
- Boolean siReserved2;
- SInt16 siShutDownMins;
- SInt16 siCacheControl; /* no longer used */
- SInt16 siVolParmsStepSize;
- SInt16 siVolParmsIncrement;
- SInt16 siVolParmsFirstDelay;
- SInt16 siVolParmsMaxDelay;
- SInt32 siRACacheFileBufSize; /* no longer used */
- SInt32 siRACacheSize; /* no longer used */
- SInt16 siDirCacheMaxWidth; /* no longer used */
- SInt32 siDirCacheSize; /* no longer used */
- SInt32 siIconCacheSize; /* no longer used */
- SInt32 siBTMemReservedFromCache;
- SInt16 siSpare[1]; /* reserved */
- Str198 siLoginMsg;
- };
- typedef struct SetupInfoRec SetupInfoRec;
-
- typedef SetupInfoRec * SetupInfoPtr;
-
- struct SetupParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- SetupInfoPtr scSetupPtr;
- SInt16 scMaxVolumes;
- SInt16 scMaxExpFolders;
- SInt16 scCode;
- SInt16 scCurMaxSessions;
- };
- typedef struct SetupParam SetupParam;
- typedef SetupParam * SetupParamPtr;
-
- struct StatusParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- StringPtr scNamePtr;
- SInt16 reserved2;
- SInt16 reserved3;
- SInt16 scCode;
- SInt16 scServerFlags;
- SInt16 scNumSessions;
- SInt32 scUserListModDate;
- SInt16 scActivity;
- SInt32 scVolListModDate;
- };
- typedef struct StatusParam StatusParam;
- typedef StatusParam * StatusParamPtr;
-
- struct ServerEventParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- ServerEventQEntryPtr scSEQEntryPtr;
- SInt16 reserved2;
- SInt16 reserved3;
- SInt16 scCode;
- };
- typedef struct ServerEventParam ServerEventParam;
- typedef ServerEventParam * ServerEventParamPtr;
-
- struct VersionParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- StringPtr scExtNamePtr;
- SInt16 reserved2;
- SInt16 reserved3;
- SInt16 scCode;
- SInt16 scServerType;
- SInt16 scServerVersion;
- };
- typedef struct VersionParam VersionParam;
- typedef VersionParam * VersionParamPtr;
-
- struct UserInfoParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- StringPtr scNamePtr;
- SInt16 reserved2;
- SInt16 reserved3;
- SInt16 scCode;
- SInt32 scPosition;
- SInt32 scUNRecID;
- SInt32 scUserID;
- SInt32 scLoginTime;
- SInt32 scLastUseTime;
- SInt32 scSocketNum;
- };
- typedef struct UserInfoParam UserInfoParam;
- typedef UserInfoParam * UserInfoParamPtr;
-
- struct VolMountedParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- Ptr reserved;
- SInt16 scVRefNum;
- SInt16 reserved3;
- SInt16 scCode;
- SInt16 scFilesOpen;
- SInt16 scWriteableFiles;
- SInt32 scUNRecID;
- Boolean scMounted;
- Boolean scMountedAsOwner;
- };
- typedef struct VolMountedParam VolMountedParam;
- typedef VolMountedParam * VolMountedParamPtr;
-
- struct SCCacheStatsRec {
- SInt16 csVersion;
- SInt32 csCacheTime;
- SInt32 csRACacheAttempts; /* file cache */
- SInt32 csRACacheHits;
- SInt32 csRACacheTotalEntries;
- SInt32 csRACacheEntriesInUse;
- SInt32 csRACacheEntrySize;
- SInt32 csDirCacheAttempts; /* dir cache */
- SInt32 csDirCacheHits;
- SInt32 csDirCacheTotalEntries;
- SInt32 csDirCacheEntriesInUse;
- SInt32 csDirCacheEntrySize;
- SInt32 csIconCacheAttempts; /* dt cache */
- SInt32 csIconCacheHits;
- SInt32 csIconCacheTotalEntries;
- SInt32 csIconCacheEntriesInUse;
- SInt32 csIconCacheEntrySize;
- SInt32 csACtlCacheAttempts; /* PDS info, part of dir cache */
- SInt32 csACtlCacheHits;
- SInt32 csACtlCacheTotalEntries;
- SInt32 csACtlCacheEntriesInUse;
- SInt32 csACtlCacheEntrySize;
- SInt32 csAUXCacheAttempts; /* not used */
- SInt32 csAUXCacheHits;
- SInt32 csAUXCacheTotalEntries;
- SInt32 csAUXCacheEntriesInUse;
- SInt32 csAUXCacheEntrySize;
- /* New fields for version 3 record*/
- SInt32 csEnumCacheAttempts;
- SInt32 csEnumCacheHits;
- SInt32 csEnumCacheTotalEntries;
- SInt32 csEnumCacheEntriesInUse;
- SInt32 csEnumCacheEntrySize;
- SInt32 csMaxFBUsed;
- SInt32 csSkipPrsAttempts;
- SInt32 csSkipPrsHits;
- };
- typedef struct SCCacheStatsRec SCCacheStatsRec;
- typedef SCCacheStatsRec * SCCacheStatsRecPtr;
-
- struct SCOldCacheStatsRec {
- SInt16 csVersion;
- SInt32 csCacheTime;
- SInt32 csRACacheAttempts; /* file cache */
- SInt32 csRACacheHits;
- SInt32 csRACacheTotalEntries;
- SInt32 csRACacheEntriesInUse;
- SInt32 csRACacheEntrySize;
- SInt32 csDirCacheAttempts; /* dir cache */
- SInt32 csDirCacheHits;
- SInt32 csDirCacheTotalEntries;
- SInt32 csDirCacheEntriesInUse;
- SInt32 csDirCacheEntrySize;
- SInt32 csIconCacheAttempts; /* dt cache */
- SInt32 csIconCacheHits;
- SInt32 csIconCacheTotalEntries;
- SInt32 csIconCacheEntriesInUse;
- SInt32 csIconCacheEntrySize;
- SInt32 csACtlCacheAttempts; /* PDS info, part of dir cache */
- SInt32 csACtlCacheHits;
- SInt32 csACtlCacheTotalEntries;
- SInt32 csACtlCacheEntriesInUse;
- SInt32 csACtlCacheEntrySize;
- SInt32 csAUXCacheAttempts; /* not used */
- SInt32 csAUXCacheHits;
- SInt32 csAUXCacheTotalEntries;
- SInt32 csAUXCacheEntriesInUse;
- SInt32 csAUXCacheEntrySize;
- };
- typedef struct SCOldCacheStatsRec SCOldCacheStatsRec;
- typedef SCOldCacheStatsRec * SCOldCacheStatsRecPtr;
-
- struct GetCacheStatsParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- Ptr reserved;
- SInt16 reserved2;
- SInt16 reserved3;
- SInt16 scCode;
- SInt16 reserved4;
- SCCacheStatsRecPtr scCacheStatsPtr;
- SInt16 scCacheStatsReqSize;
- SInt16 scCacheStatsActSize;
- };
- typedef struct GetCacheStatsParam GetCacheStatsParam;
- typedef GetCacheStatsParam * GetCacheStatsParamPtr;
-
- struct ResetCacheParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- SInt32 reserved;
- SInt16 reserved2;
- SInt16 reserved3;
- SInt16 scCode;
- SInt16 bitmap;
- };
- typedef struct ResetCacheParam ResetCacheParam;
- typedef ResetCacheParam * ResetCacheParamPtr;
- /* Used in extended user call if attrVersion is kOldUserAttrRecVersion... */
-
- struct OldUserAttrRec {
- SInt32 scLoginTime;
- SInt32 scLastUseTime;
- SInt32 scSocketNum;
- SInt16 scConnectionType;
- SInt16 scDisconnectID;
- };
- typedef struct OldUserAttrRec OldUserAttrRec;
-
- typedef OldUserAttrRec * OldUserAttrPtr;
- /* Used in extended user call if attrVersion is kUserAttrRecVersion... */
-
- struct UserAttrRec {
- SInt32 scLoginTime;
- SInt32 scLastUseTime;
- SInt32 scSocketNum;
- FourCharCode scProtocolType; /* The Session Protocol, i.e. AFP, FTP, SMB */
- FourCharCode scTransportType; /* The Transport, i.e. ATP, TCP/IP */
- StringPtr scSessionNamePtr; /* Str63 */
- SInt32 scDisconnectID;
- };
- typedef struct UserAttrRec UserAttrRec;
-
- typedef UserAttrRec * UserAttrPtr;
-
- struct ExtUserInfoParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- StringPtr scNamePtr;
- SInt16 reserved2;
- SInt16 reserved3;
- SInt16 scCode;
- SInt32 scPosition;
- SInt32 scUNRecID;
- SInt32 scUserID;
- SInt16 attrVersion;
- UserAttrPtr scUserAttrPtr;
- };
- typedef struct ExtUserInfoParam ExtUserInfoParam;
- typedef ExtUserInfoParam * ExtUserInfoParamPtr;
-
- struct ServiceStateParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- StringPtr reserved;
- SInt16 reserved2;
- SInt16 reserved3;
- SInt16 scCode;
- SInt16 afpTCPState;
- SInt16 httpState;
- SInt16 otherState;
- SInt16 multiHoming;
- SInt16 srvrUsageLimit;
- };
- typedef struct ServiceStateParam ServiceStateParam;
- typedef ServiceStateParam * ServiceStateParamPtr;
-
- struct PlugInInfoParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- SInt32 reserved;
- SInt16 reserved2;
- SInt16 reserved3;
- SInt16 scCode;
- SInt16 version;
- SInt32 index;
- UInt8 error;
- UInt8 reserved4;
- char name[32];
- char versionStr[12];
- char adminURL[256];
- UInt32 plugInAttributes;
- SInt32 plugInRef;
- SInt16 isLast;
- };
- typedef struct PlugInInfoParam PlugInInfoParam;
- typedef PlugInInfoParam * PlugInInfoParamPtr;
-
- struct PlugInMimeTypeParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- SInt32 reserved;
- SInt16 reserved2;
- SInt16 reserved3;
- SInt16 scCode;
- SInt16 version;
- SInt32 plugInRef;
- SInt32 index;
- UInt8 error;
- UInt8 reserved4;
- char mimetype[80];
- char suffix[32];
- OSType typeCode;
- OSType creatorCode;
- SInt16 isLast;
- };
- typedef struct PlugInMimeTypeParam PlugInMimeTypeParam;
- typedef PlugInMimeTypeParam * PlugInMimeTypeParamPtr;
-
- struct SetHistoryParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- SInt32 reserved;
- SInt16 reserved2;
- SInt16 historySampleTime;
- SInt16 scCode;
- };
- typedef struct SetHistoryParam SetHistoryParam;
- typedef SetHistoryParam * SetHistoryParamPtr;
-
- struct HistoryData {
- UInt8 dpMin;
- UInt8 dpMax;
- UInt8 dpAverage;
- UInt8 filler;
- };
- typedef struct HistoryData HistoryData;
-
- struct ServerHistoryRec {
- UInt32 historySyncCount;
- UInt32 historyLastSample;
- UInt16 historySampleTime;
- UInt16 numDataPoints;
- HistoryData dataPoint[1024];
- };
- typedef struct ServerHistoryRec ServerHistoryRec;
-
- typedef ServerHistoryRec * ServerHistoryPtr;
-
- struct GetHistoryParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- ServerHistoryPtr scHistory;
- SInt16 numDataPointsRequested;
- SInt16 reserved2;
- SInt16 scCode;
- };
- typedef struct GetHistoryParam GetHistoryParam;
- typedef GetHistoryParam * GetHistoryParamPtr;
-
- struct SMBConfigParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code*/
- UInt32 reserved;
- UInt32 reserved2;
- SInt16 scCode;
- Boolean enabled;
- UInt8 reserved3;
- Str63 netBIOSName;
- Str63 workgroupName;
- Str63 comment;
- Str63 winsAddress;
- };
- typedef struct SMBConfigParam SMBConfigParam;
- typedef SMBConfigParam * SMBConfigParamPtr;
- /*
- Do not use the following ObsoleteBlockUserRec structure. This corresponds
- to the original BlockUserRecParam call version (version 1), and has been
- superceeded by version 2 as of May, 1999. The BlockGetUser call will
- honor the old format for binary compatibilty, but you should switch
- to using the most current version. The change is to the field "name",
- which has been switched from type Str32Field to type Str31. This removes
- alignment and padding problems with some compilers, and is more correct.
- */
-
- struct ObsoleteBlockUserRec1 {
- Str32Field name;
- UInt32 recID;
- UInt32 id;
- UInt32 loginTime;
- UInt32 lastUseTime;
- OSType serviceType;
- OSType sessionType;
- union {
- AddrBlock at;
- UInt32 ip;
- } address;
- };
- typedef struct ObsoleteBlockUserRec1 ObsoleteBlockUserRec1;
-
- struct BlockUserRec {
- Str31 name;
- UInt32 recID;
- UInt32 id;
- UInt32 loginTime;
- UInt32 lastUseTime;
- OSType serviceType;
- OSType sessionType;
- UInt32 flags;
- UInt32 disconnectTimer;
- union {
- AddrBlock at;
- UInt32 ip;
- } address;
- };
- typedef struct BlockUserRec BlockUserRec;
-
- typedef BlockUserRec * BlockUserPtr;
-
- struct BlockUserRecParam {
- QElemPtr qLink; /*queue link in header*/
- SInt16 qType; /*type byte for safety check*/
- SInt16 ioTrap; /*FS: the Trap*/
- Ptr ioCmdAddr; /*FS: address to dispatch to*/
- SCCompletionUPP ioCompletion; /*completion routine addr (0 for synch calls)*/
- OSErr ioResult; /*result code; -39 == more users than buffer*/
- UInt32 reserved;
- UInt32 reserved2;
- SInt16 scCode;
- UInt32 version; /* Should be kSCBlockGetUserRecVersion. */
- UInt32 numUsers; /* On input, size of buffer. On output, num users. */
- BlockUserPtr users; /* Pointer to array of SUserRecs to be filled in by call. */
- };
- typedef struct BlockUserRecParam BlockUserRecParam;
- typedef BlockUserRecParam * BlockUserRecParamPtr;
-
- union SCParamBlockRec {
- StartParam startParam;
- DisconnectParam disconnectParam;
- PollServerParam pollServerParam;
- StandardParam standardParam;
- SetupParam setupParam;
- StatusParam statusParam;
- ServerEventParam serverEventParam;
- VersionParam versionParam;
- UserInfoParam userInfoParam;
- VolMountedParam volMountedParam;
- GetCacheStatsParam getCacheStatsParam;
- ResetCacheParam resetCacheParam;
- ExtUserInfoParam extUserInfoParam;
- ServiceStateParam serviceStateParam;
- PlugInInfoParam plugInInfoParam;
- PlugInMimeTypeParam plugInMimeTypeParam;
- SetHistoryParam setHistoryParam;
- GetHistoryParam getHistoryParam;
- SMBConfigParam smbConfigParam;
- BlockUserRecParam blockGetUserParam;
- };
- typedef union SCParamBlockRec SCParamBlockRec;
-
- typedef SCParamBlockRec * SCParamBlockPtr;
- /* 68K Trap Interface ------------------------------------------------------------------------------ */
- #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
- #pragma parameter __D0 ServerDispatchSync(__A0)
- #endif
- EXTERN_API( OSErr )
- ServerDispatchSync (SCParamBlockPtr paramBlock) TWOWORDINLINE(0x7000, 0xA094);
-
- /* Note: there is no ServerDispatchAsync! */
- /* Gestaltage -------------------------------------------------------------------------------------- */
-
- enum {
- gestaltASIPFSVersion = FOUR_CHAR_CODE('#!#7') /* Defined only from 6.0... */
- };
-
- /* ------------------------------------------------------------------------------------------------- */
-
-
- #if PRAGMA_STRUCT_ALIGN
- #pragma options align=reset
- #elif PRAGMA_STRUCT_PACKPUSH
- #pragma pack(pop)
- #elif PRAGMA_STRUCT_PACK
- #pragma pack()
- #endif
-
- #ifdef PRAGMA_IMPORT_OFF
- #pragma import off
- #elif PRAGMA_IMPORT
- #pragma import reset
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __APPLESHAREFILESERVERCONTROL__ */
-
-